<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
use common\models\Poststatus;
use yii\helpers\ArrayHelper;
use common\models\common\models;
use common\models\Adminuser;


/* @var $this yii\web\View */
/* @var $model common\models\Post */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="post-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'id')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'name')->textInput(['rows' => 6]) ?>

    <?php
    $array = [
        ['id' => '1', 'name' => '角色',],

        ['id' => '2', 'name' => '权限',],
    ];
    ?>
    <?= $form->field($model,'type')
        ->dropDownList($result = ArrayHelper::map($array, 'id', 'name'),
            ['prompt'=>'请选择状分类']);?>

    <?= $form->field($model, 'description')->textInput(['rows' => 6]) ?>


    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? '新增' : '修改', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
